The present invention relates to circuits such as a peak detector circuit for detecting the peak level of an input signal.
The basic theory of a peak detector is to compare the input voltage level to the output voltage level to determine if the input signal has reached a new peak voltage level. If indeed the input signal has reached a new peak, the peak detector will respond in a manner to increase the voltage level of the output signal until it has attained the same voltage of the peak input signal. A common technique used by typical peak detectors is to charge up a capacitor such that the voltage across the capacitor is indicative of the peak voltage level of the input signal. Further, when the input voltage falls below the output voltage, the capacitor maintains the peak input voltage level at the output of the peak detector until a new voltage peak appears on the input signal whereby the capacitor is then charged to a higher voltage which is indicative of the new voltage peak occurring on the input signal.
Typical peak detectors charge the voltage across the capacitor, representing the peak level of an input signal, at uncontrolled rates. However, it may be desirable to charge the capacitor at a predetermined rate. Further, the output of typical peak detectors holds the peak voltage level occurring on the input signal until a new peak voltage appears. However, in some applications, it may be desirable to discharge the voltage across the capacitor so that a new lower peak level may be acquired within a new time interval.
Hence, what is needed is a peak detector that charges and discharges a capacitor at predetermined rates.